package com.sale.table.controller;

import com.sale.common.core.web.controller.BaseController;
import com.sale.common.mybatis.core.page.PageQuery;
import com.sale.common.mybatis.core.page.TableDataInfo;
import com.sale.table.domain.*;
import com.sale.table.domain.vo.*;
import com.sale.table.service.ITableGoodsService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description 财务模块报表
 * @Date 23-09-14
 * @Author hl
 **/
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/tableGoods")
public class TableGoodsController extends BaseController {

    private final ITableGoodsService tableGoodsService;


    /**
     * 往来单位一览表 (客户and供应商)
     */
    @GetMapping("/listCome")
    public List<GoodsCome> listCome(GoodsComeVo goodsComeVo)
    {
        return tableGoodsService.selectTableComeList(goodsComeVo);
    }

    /**
     * 客户对账单
     */
    @GetMapping("/listClient")
    public List<GoodsReconciliation> listRight(GoodsReconciliationVo goodsReconciliationVo)
    {
        return tableGoodsService.selectClientRightList(goodsReconciliationVo);
    }

    /**
     * 供应商对账单
     */
    @GetMapping("/listSupplier")
    public List<GoodsReconciliation> listSupplier(GoodsSupplierVo goodsSupplierVo)
    {
        return tableGoodsService.selectSupplierRightList(goodsSupplierVo);
    }

    /**
     * 应收账款明细表
     */
    @GetMapping("/listReceivable")
    public List<GoodsReceivable> listReceivable(GoodsReceivableVo goodsReceivableVo)
    {
        return tableGoodsService.selectReceivableList(goodsReceivableVo);
    }

    /**
     * 应付账款明细表
     */
    @GetMapping("/listCopeWith")
    public List<GoodsCopeWith> listCopeWith(GoodsCopeWithVo goodsCopeWithVo)
    {
        return tableGoodsService.selectCopeWithList(goodsCopeWithVo);
    }

    /**
     * 金额报表
     */
    @GetMapping("/listAmount")
    public List<GoodsAmount> listAmount(GoodsAmountVo goodsAmountVo)
    {
        return tableGoodsService.selectAmountList(goodsAmountVo);
    }


    /**
     * 利润表
     */
    @GetMapping("/listProfit")
    public GoodsProfit listProfit(GoodsProfitVo goodsProfitVo)
    {
        return tableGoodsService.selectProfitList(goodsProfitVo);
    }



}
